Belgelerim/ceng_491/implementation/doxygen/TraffEdu_Developers_Manual_Reference_ToSource/CommandView.cpp

Go to the documentation of this file.
00001 #include "CommandView.h"
00002 
00003 
00004 
00005 CommandView::CommandView(OSGWindows *osgwind)
00006 {
00007         osgwind_=osgwind;
00008 
00009 }
00010 
00011 CommandView::~CommandView()
00012 {
00013 
00014 }
00015 void CommandView::hideDispTrafficSigns()
00016 {
00017         if(m_bTrafficSignsChecked)
00018         {
00019                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00020                 {
00021                         if(((osgwind_->getObjects()).at(i)->getObjectType()==SIGN)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00022                                 (osgwind_->getObjects()).at(i)->hide(osgwind_->getConstantRoot());
00023                 }
00024                 m_bTrafficSignsChecked = false;
00025         }
00026         else 
00027         {
00028                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00029                 {
00030                         if(((osgwind_->getObjects()).at(i)->getObjectType()==SIGN)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00031                                 (osgwind_->getObjects()).at(i)->display(osgwind_->getConstantRoot());
00032                 }
00033                 m_bTrafficSignsChecked = true;
00034         }
00035 }
00036 
00037 void CommandView::hideDispTrafficLights()
00038 {
00039         if(m_bTrafficLightsChecked)
00040         {
00041                 
00042                 
00043                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00044                 {
00045                         if(((osgwind_->getObjects()).at(i)->getObjectType()==LIGHT)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00046                                 (osgwind_->getObjects()).at(i)->hide(osgwind_->getConstantRoot());
00047                 }
00048                 
00049                 m_bTrafficLightsChecked = false;
00050         }
00051 
00052         else 
00053         {
00054 
00055                 
00056                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00057                 {
00058                         if(((osgwind_->getObjects()).at(i)->getObjectType()==LIGHT)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00059                                 (osgwind_->getObjects()).at(i)->display(osgwind_->getConstantRoot());
00060                 }
00061 
00062                 m_bTrafficLightsChecked = true;
00063         }
00064 }
00065 
00066 void CommandView::hideDispEnvObjs()
00067 {
00068         if(m_bEnvObjsChecked)
00069         {
00070                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00071                 {
00072                         if(((osgwind_->getObjects()).at(i)->getObjectType()==ENVIRONMENTOBJECT)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00073                                 (osgwind_->getObjects()).at(i)->hide(osgwind_->getConstantRoot());
00074                 }
00075                 m_bTrafficSignsChecked = false;
00076         }
00077         else 
00078         {
00079                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00080                 {
00081                         if(((osgwind_->getObjects()).at(i)->getObjectType()==ENVIRONMENTOBJECT)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00082                                 (osgwind_->getObjects()).at(i)->display(osgwind_->getConstantRoot());
00083                 }
00084                 m_bTrafficSignsChecked = true;
00085         }
00086 }
00087 
00088 void CommandView::hideDispVehicles()
00089 {
00090         if(m_bVehiclesChecked)
00091         {               
00092                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00093 
00094                 {
00095                         if(((osgwind_->getObjects()).at(i)->getObjectType()==VEHICLE)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00096                                 (osgwind_->getObjects()).at(i)->hide(osgwind_->getConstantRoot());
00097                 }
00098                 
00099                 m_bVehiclesChecked = false;
00100         }
00101         else 
00102         {
00103                 for(int i=0; i<(int)osgwind_->getObjects().size(); i++)
00104 
00105                 {
00106                         if(((osgwind_->getObjects()).at(i)->getObjectType()==VEHICLE)&&(((osgwind_->getObjects()).at(i))->getCondition()=='a'))
00107                                 (osgwind_->getObjects()).at(i)->display(osgwind_->getConstantRoot());
00108                 }
00109                 m_bVehiclesChecked = true;
00110         }
00111 }
00112 
00113 void CommandView::hideDispPaths()
00114 {
00115 
00116 }
00117 
00118 void CommandView::hideDispToolBox()
00119 {
00120 
00121 }

Generated on Sun May 28 18:54:09 2006 for TraffEdu by  doxygen 1.4.6-NO